package com.aierkeji.call.cms.entity.contants;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import com.aierkeji.call.cms.entity.vo.SearchOptionsVo;
import com.fasterxml.jackson.annotation.JsonFormat;

@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum CallResult {
	UNCONFIRM("无意向"),
	WAIT("待跟进"),
	CONFIRM("已成交");
	private String name;

	public String getName() {
		return name;
	}

	private CallResult(String name) {
		this.name = name;
	}
	
	public  static List<SearchOptionsVo> changeSearchOptionVo(){
		Stream<CallResult> stream = Arrays.stream(CallResult.values());
		List<SearchOptionsVo> list = stream.map(k->new SearchOptionsVo(k.getName(),k.name())).collect(Collectors.toList());
		return list;
	}
}
